public class BankAccountTest2 {
    public static void main(String[] args) {
//        CheckingAccount checkingAccount= new CheckingAccount(10000);
//        checkingAccount.deposit(100.50);
//        System.out.println("余额是:"+checkingAccount.getBalance());
//        checkingAccount.withdraw(60.5);
//        System.out.println("余额是:"+checkingAccount.getBalance());
        //测试SavingsAccount方法
        SavingsAccount savingsAccount=new SavingsAccount(1000);
        savingsAccount.deposit(100);
        savingsAccount.deposit(100);
        savingsAccount.deposit(100);
        System.out.println(savingsAccount.getBalance());
        savingsAccount.withdraw(100);
        System.out.println(savingsAccount.getBalance());
        savingsAccount.earnMonthlyInterest();
        System.out.println(savingsAccount.getBalance());

    }
}
